﻿@model FC.Data.ViewModels.Contests.ProblemList

@{
    ViewBag.Title = ViewBag.CollectionName;
    Layout = "~/Views/Shared/_ContestsContentLayout.cshtml";
}

<h2>
    @ViewBag.Title
</h2>
<hr />
<table class="table" style="border-bottom:solid 1px rgb(221,221,221); font-size:12px;">
    <thead>
        <tr style="font-size:15px;">
            <th>编号</th>
            <th>标题</th>
            <th>分类</th>
            <th>状态</th>
            <th style="text-align: center">通过</th>
            <th style="text-align: center">提交</th>
            <th style="text-align: center">通过率</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Problems)
        {
            <tr class="@item.StateCSS">
                <td style="width:80px;">
                    <a href="~/Contests/Problems/@ViewBag.Collection/@item.No">
                        @Html.DisplayFor(modelItem => item.No)
                    </a>
                </td>
                <td>
                    <a href="~/Contests/Problems/@ViewBag.Collection/@item.No">
                        @Html.DisplayFor(modelItem => item.Title)
                    </a>
                </td>
                <td style="width:200px;">
                    @Html.DisplayFor(modelItem => item.Keyword)
                </td>
                <td style="width:120px;">
                    @Html.DisplayFor(modelItem => item.State)
                </td>
                <td style="width:65px; text-align: center">
                    @Html.DisplayFor(modelItem => item.PassCount)
                </td>
                <td style="width:65px; text-align: center">
                    @Html.DisplayFor(modelItem => item.SubmitCount)
                </td>
                <td style="width:65px; text-align: center">
                    @Html.DisplayFor(modelItem => item.PassRate)
                </td>
            </tr>
        }
    </tbody>
</table>
<ul class="pagination" style="margin-top:0">
    <li><a href="~/Contests/List/@ViewBag.Collection">首页</a></li>
    @for (int i = 1; i <= Model.PageCount; i++)
    {
        if (i == Model.Page)
        {
            <li><a href="#">@i</a></li>
        }
        else
        {
            <li><a href="~/Contests/List/@ViewBag.Collection?Page=@i">@i</a></li>
        }
    }
    <li><a href="~/Contests/List/@ViewBag.Collection?Page=@Model.PageCount">尾页</a></li>
</ul>

